package com.huika.renrench.control.my.activity;

import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.huika.lib.utils.MoneyShowTool;
import com.huika.renrench.R;
import com.huika.renrench.control.common.base.BaseAct;
import com.huika.renrench.support.bean.WithDrawBean;
import com.huika.renrench.utils.DateTimeTool;
import com.huika.renrench.view.TitleBarHelper;

/**
 * 
 * @description：提现成功
 * @author zc
 * @date 2015年6月23日 下午5:16:08
 */
public class WithdrawSuActivity extends BaseAct {

	private Button complete;
	private TextView odd_number_detail;
	private TextView money_detail;
	private TextView card_detail;
	private TextView time_detail;
	private WithDrawBean withdrawBean;
	
	@Override
	protected void initData() {
		super.initData();
		TitleBarHelper titleBarHelper = new TitleBarHelper(this, -1);
		titleBarHelper.setLeftMsg("返回");
		titleBarHelper.setTitleMsg("提现");
		withdrawBean = (WithDrawBean) getIntent().getSerializableExtra("withdrawBean");
	}
	
	@Override
	protected void initWidget() {
		super.initWidget();
		odd_number_detail = (TextView) findViewById(R.id.odd_number_detail);
		money_detail = (TextView) findViewById(R.id.money_detail);
		complete = (Button) findViewById(R.id.complete);
		card_detail = (TextView) findViewById(R.id.card_detail);
		time_detail = (TextView) findViewById(R.id.time_detail);
		
		odd_number_detail.setText(withdrawBean.orderNo);
		money_detail.setText(MoneyShowTool.twolastDF(withdrawBean.amount) + "元");
		card_detail.setText(withdrawBean.bankName + " " + withdrawBean.bankNo);
		time_detail.setText(DateTimeTool.getTimeWithFormat(withdrawBean.createDt, "yyyy-MM-dd HH:mm:ss", true));
		complete.setOnClickListener(this);
	}
	
	@Override
	public void widgetClick(View v) {
		super.widgetClick(v);
		switch (v.getId()) {
			case R.id.complete:
				finish();
				break;

			default:
				break;
		}
	}
	
	@Override
	public void setRootView() {
		setContentView(R.layout.activity_withdraw_success);
	}

}
